package com.msr.service;

import com.msr.bean.FoodType;
import com.msr.mapper.FoodTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class FoodTypeServiceImpl implements FoodTypeService {

    @Autowired
    private FoodTypeMapper foodTypeMapper;

    @Override
    public int addFoodType(FoodType foodType) {
        return foodTypeMapper.addFoodType(foodType);
    }

    @Override
    public int deleteFoodType(int id) {
        return foodTypeMapper.deleteFoodType(id);
    }

    @Override
    public int updateFoodType(FoodType foodType) {
        return foodTypeMapper.updateFoodType(foodType);
    }

    @Override
    public List<FoodType> getFoodTypes(FoodType foodType) {
        return foodTypeMapper.getFoodTypes(foodType);
    }

    @Override
    public FoodType getById(int id) {
        return foodTypeMapper.getById(id);
    }
}
